<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
  <style>
    .outer{
      width: 400px;
      background-color: gray;
      border: 1px solid red;
      /*overflow: hidden;*/
      /*height: 200px;*/
      /*float: left;*/
      /*  clear: both;*/
    }
    .box{
      background-color: orange;
      width: 100px;
      height: 100px;
      margin: 10px;
    }
    .box1,.box2,.box3{
      float: left;
    }
    /*div::after{*/
    /*    clear: both;*/
    /*    display: block;*/
    /*    content: "";*/
    /*}*/
  </style>
</head>
<body>
<div class="outer">
  <div class="box box1">1</div>
  <div class="box box2">2</div>
  <div class="box box3">3</div>
    <div style="clear: both"></div>
  <div class="box box4">4</div>
</div>
</body>
</html>